<?php
namespace app\api\model;

use think\Model;

class Admin extends Base{
    protected $name = 'admin';

    // 开启自动补齐时间戳
    protected $autoWriteTimestamp = true;
    protected $updateTime = false;

    // 获取器
    public function getLogoAttr($val){
        if(!$val){
            return $val;
        }

        return config('app.url') . $val;
    }

    public function getIsBusinessAttr($val){
        $type = [0 => '休息中', 1 => '营业中'];
        return $type[$val];
    }
}